<nav:Page xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:xom="clr-namespace:Xomega.Framework;assembly=Xomega.Framework"
          xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:nav="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
          xmlns:rest="http://www.xomega.net/rest"
          Title="Employee Details"
          x:Class="AdventureWorks.Client.Silverlight.EmployeeDetails">
   <Grid Margin="10">
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition Height="*"/>
         <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Button Grid.Row="1" Name="btnClose" HorizontalAlignment="Right"
              VerticalAlignment="Top"
              Width="75"
              Click="btnClose_Click"
              Content="Close"/>
      <Button Grid.Row="1" Name="btnSave" HorizontalAlignment="Right" VerticalAlignment="Top"
              Margin="0,0,90,0"
              Width="75"
              Click="btnSave_Click"
              Content="Save"/>
      <Button Grid.Row="1" Name="btnDelete" HorizontalAlignment="Left"
              VerticalAlignment="Top"
              Margin="0,0,0,0"
              Width="75"
              Click="btnDelete_Click"
              Content="Delete"
              IsEnabled="False"/>
      <Grid Name="pnlMain">
         <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
         </Grid.ColumnDefinitions>
         <TextBlock Grid.Row="0" Grid.Column="0" Name="lblTemporaryKey" Text="Temporary Key:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="0" Grid.Column="1" Name="ctlTemporaryKey"
                  xom:Property.Name="TemporaryKey"
                  xom:Property.Label="{Binding ElementName=lblTemporaryKey}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="1" Grid.Column="0" Name="lblEmployeeId" Text="Employee Id:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="1" Grid.Column="1" Name="ctlEmployeeId"
                  xom:Property.Name="EmployeeId"
                  xom:Property.Label="{Binding ElementName=lblEmployeeId}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="2" Grid.Column="0" Name="lblNationalIDNumber"
                    Text="National ID Number:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="2" Grid.Column="1" Name="ctlNationalIDNumber"
                  xom:Property.Name="NationalIDNumber"
                  xom:Property.Label="{Binding ElementName=lblNationalIDNumber}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="3" Grid.Column="0" Name="lblLogin" Text="Login:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="3" Grid.Column="1" Name="ctlLogin" xom:Property.Name="Login"
                  xom:Property.Label="{Binding ElementName=lblLogin}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="4" Grid.Column="0" Name="lblManager" Text="Manager:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="4" Grid.Column="1" Name="ctlManager" xom:Property.Name="Manager"
                  xom:Property.Label="{Binding ElementName=lblManager}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="5" Grid.Column="0" Name="lblTitle" Text="Title:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="5" Grid.Column="1" Name="ctlTitle" xom:Property.Name="Title"
                  xom:Property.Label="{Binding ElementName=lblTitle}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="6" Grid.Column="0" Name="lblBirthDate" Text="Birth Date:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="6" Grid.Column="1" Name="ctlBirthDate" xom:Property.Name="BirthDate"
                  xom:Property.Label="{Binding ElementName=lblBirthDate}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="7" Grid.Column="0" Name="lblMaritalStatus" Text="Marital Status:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <ComboBox Grid.Row="7" Grid.Column="1" Name="ctlMaritalStatus"
                   xom:Property.Name="MaritalStatus"
                   xom:Property.Label="{Binding ElementName=lblMaritalStatus}"
                   Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="8" Grid.Column="0" Name="lblGender" Text="Gender:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <ComboBox Grid.Row="8" Grid.Column="1" Name="ctlGender" xom:Property.Name="Gender"
                   xom:Property.Label="{Binding ElementName=lblGender}"
                   Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="9" Grid.Column="0" Name="lblHireDate" Text="Hire Date:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="9" Grid.Column="1" Name="ctlHireDate" xom:Property.Name="HireDate"
                  xom:Property.Label="{Binding ElementName=lblHireDate}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="10" Grid.Column="0" Name="lblSalariedFlag" Text="Salaried Flag:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <CheckBox Grid.Row="10" Grid.Column="1" Name="ctlSalariedFlag"
                   xom:Property.Name="SalariedFlag"
                   xom:Property.Label="{Binding ElementName=lblSalariedFlag}"
                   Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="0" Grid.Column="2" Name="lblVacationHours" Text="Vacation Hours:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="0" Grid.Column="3" Name="ctlVacationHours"
                  xom:Property.Name="VacationHours"
                  xom:Property.Label="{Binding ElementName=lblVacationHours}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="1" Grid.Column="2" Name="lblSickLeaveHours" Text="Sick Leave Hours:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="1" Grid.Column="3" Name="ctlSickLeaveHours"
                  xom:Property.Name="SickLeaveHours"
                  xom:Property.Label="{Binding ElementName=lblSickLeaveHours}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="2" Grid.Column="2" Name="lblCurrentFlag" Text="Current Flag:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <CheckBox Grid.Row="2" Grid.Column="3" Name="ctlCurrentFlag"
                   xom:Property.Name="CurrentFlag"
                   xom:Property.Label="{Binding ElementName=lblCurrentFlag}"
                   Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="3" Grid.Column="2" Name="lblRowguid" Text="Rowguid:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="3" Grid.Column="3" Name="ctlRowguid" xom:Property.Name="Rowguid"
                  xom:Property.Label="{Binding ElementName=lblRowguid}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="4" Grid.Column="2" Name="lblModifiedDate" Text="Modified Date:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="4" Grid.Column="3" Name="ctlModifiedDate"
                  xom:Property.Name="ModifiedDate"
                  xom:Property.Label="{Binding ElementName=lblModifiedDate}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="5" Grid.Column="2" Name="lblFirstName" Text="First Name:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="5" Grid.Column="3" Name="ctlFirstName" xom:Property.Name="FirstName"
                  xom:Property.ChildObject="Contact"
                  xom:Property.Label="{Binding ElementName=lblFirstName}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="6" Grid.Column="2" Name="lblMiddleName" Text="Middle Name:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="6" Grid.Column="3" Name="ctlMiddleName"
                  xom:Property.Name="MiddleName"
                  xom:Property.ChildObject="Contact"
                  xom:Property.Label="{Binding ElementName=lblMiddleName}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="7" Grid.Column="2" Name="lblLastName" Text="Last Name:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="7" Grid.Column="3" Name="ctlLastName" xom:Property.Name="LastName"
                  xom:Property.ChildObject="Contact"
                  xom:Property.Label="{Binding ElementName=lblLastName}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="8" Grid.Column="2" Name="lblEmailAddress" Text="Email Address:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="8" Grid.Column="3" Name="ctlEmailAddress"
                  xom:Property.Name="EmailAddress"
                  xom:Property.ChildObject="Contact"
                  xom:Property.Label="{Binding ElementName=lblEmailAddress}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Grid.Row="9" Grid.Column="2" Name="lblPhone" Text="Phone:"
                    Style="{StaticResource LabelStyle}"
                    FontWeight="{Binding Path=(xom:Property.Required), RelativeSource={RelativeSource Self}, Converter={StaticResource Required2FontWeight}}"/>
         <TextBox Grid.Row="9" Grid.Column="3" Name="ctlPhone" xom:Property.Name="Phone"
                  xom:Property.ChildObject="Contact"
                  xom:Property.Label="{Binding ElementName=lblPhone}"
                  Style="{StaticResource ControlStyle}"/>
         <TextBlock Name="lblPayHistory" Grid.Row="11" Grid.ColumnSpan="4" Text="Pay History:"/>
         <data:DataGrid Grid.Row="12" Grid.ColumnSpan="4" Name="gridPayHistory"
                        AutoGenerateColumns="False">
            <data:DataGrid.Columns>
               <data:DataGridTemplateColumn Header="Pay Frequency">
                  <data:DataGridTemplateColumn.CellTemplate>
                     <DataTemplate>
                        <TextBlock xom:Property.Name="PayFrequency"/>
                     </DataTemplate>
                  </data:DataGridTemplateColumn.CellTemplate>
               </data:DataGridTemplateColumn>
               <data:DataGridTemplateColumn Header="Rate">
                  <data:DataGridTemplateColumn.CellTemplate>
                     <DataTemplate>
                        <TextBlock xom:Property.Name="Rate"/>
                     </DataTemplate>
                  </data:DataGridTemplateColumn.CellTemplate>
               </data:DataGridTemplateColumn>
               <data:DataGridTemplateColumn Header="Rate Change Date">
                  <data:DataGridTemplateColumn.CellTemplate>
                     <DataTemplate>
                        <TextBlock xom:Property.Name="RateChangeDate"/>
                     </DataTemplate>
                  </data:DataGridTemplateColumn.CellTemplate>
               </data:DataGridTemplateColumn>
            </data:DataGrid.Columns>
         </data:DataGrid>
      </Grid>
   </Grid>
</nav:Page>